package 自定义异常;

/**
 * @ClassName: demo
 * @Auther: Drawin
 * @Date: 2021/10/27 16:12
 * @Description:
 */

public class demo {
    public static void main(String[] args) {
    Person p=new Person();
    try {
        p.setAge(500);
    }catch (AgeException e){
        System.out.println("给age赋值错误:"+e.getMessage());
    }
}
}
